/*
 * DisplaySongInfo.java
 *
 * Created on April 8, 2006, 1:51 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.bff.mpd.musicjukebox.lib.actions;

import com.bff.mpd.musicjukebox.ui.SongInfoDialog;
import com.bff.mpd.utils.Utils;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JDialog;
import javax.swing.JFrame;
import org.bff.javampd.objects.MPDSong;

/**
 *
 * @author Bill
 */
public class DisplaySongInfoAction extends AbstractAction {
    private MPDSong song;
    private JFrame parent;
    
    /** Creates a new instance of DisplaySongInfo */
    public DisplaySongInfoAction(JFrame parent, MPDSong song) {
        this.song = song;
        this.parent = parent;
        putValue(Action.SHORT_DESCRIPTION, Utils.getMessage("ACTION_SONG_INFO_SHORT_DESC"));
        putValue(Action.NAME, Utils.getMessage("ACTION_SONG_INFO_NAME"));
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        JDialog songInfoDialog = new SongInfoDialog(parent, true, song);
        songInfoDialog.setVisible(true);
    }
    
}
